[clr-interp] Async Resume stubs are exclusive to the JIT as they use a set of intrinsics that are JIT specific#123046
Merged
davidwrighton merged 4 commits intodotnet:mainfrom Jan 13, 2026
Conversation
…a set of intrinsics that are JIT specific - Disable running the interpreter compiler for these. In real scenarios we will either have a JIT to generate them, or they will be produced by the R2R compiler, so this should be a good long term solution
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents the interpreter from attempting to compile async resume stubs, which use JIT-specific intrinsics that the interpreter cannot handle. The fix ensures that these stubs will be generated either by the JIT or R2R compiler.
- Adds a new
IsAsyncResumeStub()method to check if a dynamic method is an async resume stub - Updates the interpreter loading condition to skip async resume stubs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/vm/method.hpp | Adds IsAsyncResumeStub() helper method to DynamicMethodDesc class, following the same pattern as other stub type checking methods |
| src/coreclr/vm/jitinterface.cpp | Modifies interpreter loading condition in UnsafeJitFunction to exclude async resume stubs from interpreter compilation |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jkotas
previously approved these changes
Jan 10, 2026
janvorli
reviewed
Jan 12, 2026
The change is now materially different
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- Disable running the interpreter compiler for these. In real scenarios we will either have a JIT to generate them, or they will be produced by the R2R compiler, so this should be a good long term solutionImplement the second half of the intrinsic for SetNextCallAsyncContinuation. This allows the interpreter to correctly generate code for async resumption stubs (although it won't use them itself, as the interpreter has a different path for calling async resume stubs that we don't currently plan to remove. This is used in some of our interpreter test modes where the runtime may choose to JIT a runtime async method and interpret its associated async resumption stub.